package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ByStandardDemonstrationMapper;
import com.ruoyi.system.domain.ByStandardDemonstration;
import com.ruoyi.system.service.IByStandardDemonstrationService;

/**
 * 标准示范点Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-12
 */
@Service
public class ByStandardDemonstrationServiceImpl implements IByStandardDemonstrationService 
{
    @Autowired
    private ByStandardDemonstrationMapper byStandardDemonstrationMapper;

    /**
     * 查询标准示范点
     * 
     * @param id 标准示范点主键
     * @return 标准示范点
     */
    @Override
    public ByStandardDemonstration selectByStandardDemonstrationById(Long id)
    {
        return byStandardDemonstrationMapper.selectByStandardDemonstrationById(id);
    }

    /**
     * 查询标准示范点列表
     * 
     * @param byStandardDemonstration 标准示范点
     * @return 标准示范点
     */
    @Override
    public List<ByStandardDemonstration> selectByStandardDemonstrationList(ByStandardDemonstration byStandardDemonstration)
    {
        return byStandardDemonstrationMapper.selectByStandardDemonstrationList(byStandardDemonstration);
    }

    /**
     * 新增标准示范点
     * 
     * @param byStandardDemonstration 标准示范点
     * @return 结果
     */
    @Override
    public int insertByStandardDemonstration(ByStandardDemonstration byStandardDemonstration)
    {
        byStandardDemonstration.setCreateTime(DateUtils.getNowDate());
        return byStandardDemonstrationMapper.insertByStandardDemonstration(byStandardDemonstration);
    }

    /**
     * 修改标准示范点
     * 
     * @param byStandardDemonstration 标准示范点
     * @return 结果
     */
    @Override
    public int updateByStandardDemonstration(ByStandardDemonstration byStandardDemonstration)
    {
        byStandardDemonstration.setUpdateTime(DateUtils.getNowDate());
        return byStandardDemonstrationMapper.updateByStandardDemonstration(byStandardDemonstration);
    }

    /**
     * 批量删除标准示范点
     * 
     * @param ids 需要删除的标准示范点主键
     * @return 结果
     */
    @Override
    public int deleteByStandardDemonstrationByIds(Long[] ids)
    {
        return byStandardDemonstrationMapper.deleteByStandardDemonstrationByIds(ids);
    }

    /**
     * 删除标准示范点信息
     * 
     * @param id 标准示范点主键
     * @return 结果
     */
    @Override
    public int deleteByStandardDemonstrationById(Long id)
    {
        return byStandardDemonstrationMapper.deleteByStandardDemonstrationById(id);
    }
}
